import request from "../utils/request"



//用户注册接口
export const register = (username,password,repassword) => {
    return request({
        url:"/user/reg",
        method:"POST",
        data:{
            username,
            password,
            repassword
        }
    })
}

//用户登录接口
export const login = (username,password) => {
    return request({
        url:"/user/login",
        method:"POST",
        data : {
            username,
            password
        }
    })
}

//用户退出登录接口
export const logout = () => {
    return request({
        url:"/admin/user/logout",
        method :"POST"
    })
}

//获取用户信息和权限菜单
export const UserInfo = () => {
    return request({
        url:"/admin/user/info",
        method:"GET"
    })
}